/PROG  PNS0200
/ATTR
OWNER		= MNEDITOR;
COMMENT		= "MAX SIZE TEST";
PROG_SIZE	= 3391;
CREATE		= DATE 12-07-14  TIME 17:15:54;
MODIFIED	= DATE 12-07-14  TIME 17:46:02;
FILE_NAME	= PNS0199;
VERSION		= 0;
LINE_COUNT	= 120;
MEMORY_SIZE	= 3847;
PROTECT		= READ_WRITE;
TCD:  STACK_SIZE	= 0,
      TASK_PRIORITY	= 50,
      TIME_SLICE	= 0,
      BUSY_LAMP_OFF	= 0,
      ABORT_REQUEST	= 0,
      PAUSE_REQUEST	= 0;
DEFAULT_GROUP	= 1,*,*,*,*;
CONTROL_CODE	= 00000000 00000000;
/APPL
/MN
   1:  !******************************** ;
   2:  !     COSMA METAL FORMING  ;
   3:  !******************************** ;
   4:  !  LINE: CHINA CHANGSHA ;
   5:  !  ROBOT: R34 ;
   6:  !  PROGRAM: PNS0010 ;
   7:  !  PART:53103748 ;
   8:  !******************************** ;
   9:   ;
  10:  !INITIALIZE ;
  11:  MOVE TO HOME    ;
  12:  R[14:CG SENSETIVE]=75    ;
  13:  R[18:PICK TIME BEFORE]=1    ;
  14:  R[19:DROP TIME BEFORE]=.3    ;
  15:   ;
  16:  !------------------------------- ;
  17:  !BEGINNING OF PROGRAM ;
  18:  CALL PARTDROP    ;
  19:  COL GUARD ADJUST R[14] ;
  20:  UTOOL_NUM=1 ;
  21:  UFRAME_NUM=0 ;
  22:  PAYLOAD[1] ;
  23:   ;
  24:  !INITIATE TO PICK-POUNCE ;
  25:J P[1:MIDDLE] 50% CNT100 ACC100    ;
  26:J P[2:PICK POUNCE] 100% CNT100 ACC100 BREAK    ;
  27:   ;
  28:  R[1:CYCLE TOTAL]=0    ;
  29:  TIMER[1]=RESET ;
  30:  TIMER[1]=START ;
  31:   ;
  32:  LBL[10:TOP OF LOOF] ;
  33:  OVERRIDE=R[5:SPEED           ] ;
  34:   ;
  35:  TIMER[3]=STOP ;
  36:  TIMER[2]=STOP ;
  37:  R[1:CYCLE TOTAL]=R[1:CYCLE TOTAL]+1    ;
  38:  R[2:LAST CYCLE TIME]=TIMER[2]    ;
  39:  R[3:LAST SPM]=60/R[2:LAST CYCLE TIME]    ;
  40:  R[8:R MOVE TIME]=TIMER[3]    ;
  41:  TIMER[2]=RESET ;
  42:  TIMER[2]=START ;
  43:  TIMER[3]=RESET ;
  44:   ;
  45:  !PROCEED TO PICK ;
  46:  LBL[20] ;
  47:  IF DI[1:P3 PICK ENTRY OK]=ON AND DI[3:FROM R23 CLEAR]=ON AND DI[8:P3 PICK START]=ON,JMP LBL[25] ;
  48:  IF DI[29:CYCLE STOP]=ON,JMP LBL[90] ;
  49:  JMP LBL[20] ;
  50:   ;
  51:  LBL[25] ;
  52:  WAIT DI[1:P3 PICK ENTRY OK]=ON AND DI[3:FROM R23 CLEAR]=ON AND DI[8:P3 PICK START]=ON    ;
  53:   ;
  54:  TIMER[3]=START ;
  55:J P[3:PICK APPROACH] 100% CNT100 ACC100    ;
  56:   ;
  57:J P[4:PICK] 100% CNT75 TB R[18]sec,CALL PARTPICK ACC100 BREAK    ;
  58:  PAYLOAD[2] ;
  59:  CALL CHK_PICK    ;
  60:   ;
  61:J P[5:PICK DEPART] 100% CNT100 ACC100    ;
  62:  CALL CHECKPICK    ;
  63:   ;
  64:J P[6:PICK SNEAK] 100% CNT100 ACC100 DB  500.0mm,DO[5:TO R23 DROP START]=PULSE,0.5sec    ;
  65:J P[7:PICK CLEAR] 100% CNT100 ACC100    ;
  66:  CALL CHECKPICK    ;
  67:   ;
  68:  DO[8:P3 PARTS OUT]=PULSE,1.5sec ;
  69:   ;
  70:  LBL[30:GOTO DROP POUNCE] ;
  71:J P[8:DROP POUNCE] 100% CNT100 ACC100 BREAK    ;
  72:  CALL CHECKPICK    ;
  73:   ;
  74:  TIMER[3]=STOP ;
  75:  LBL[40:AT DROP POUNCE] ;
  76:  IF DI[2:P4 DROP ENTRY]=ON AND DI[4:FROM R45 CLEAR]=ON AND DI[5:P4 DROP START]=ON,JMP LBL[80] ;
  77:  IF DI[7:PRESS STAMPING COMPLETE]=ON AND DI[2:P4 DROP ENTRY]=ON,JMP LBL[50] ;
  78:  IF DI[18:MOVE TO CLEAR POS]=ON,JMP LBL[60] ;
  79:  JMP LBL[40] ;
  80:   ;
  81:  LBL[50:MOVE DROP SNEAK] ;
  82:  TIMER[3]=START ;
  83:J P[9:DROP SNEAK] 100% CNT100 ACC100 BREAK    ;
  84:  LBL[51:DROP OR C-P-S] ;
  85:  IF DI[2:P4 DROP ENTRY]=ON AND DI[4:FROM R45 CLEAR]=ON AND DI[5:P4 DROP START]=ON,JMP LBL[80] ;
  86:  IF DI[18:MOVE TO CLEAR POS]=ON,JMP LBL[40] ;
  87:  JMP LBL[51] ;
  88:  JMP LBL[50] ;
  89:   ;
  90:  LBL[60:MOVE CLS-PRS-ACC] ;
  91:J P[1:MIDDLE] 50% CNT100 ACC100    ;
  92:  PAUSE ;
  93:  JMP LBL[40] ;
  94:   ;
  95:  LBL[80:DROP ENABLED] ;
  96:  TIMER[3]=START ;
  97:  !PROCEED TO DROP ;
  98:J P[10:DROP APPROACH] 100% CNT100 ACC100    ;
  99:   ;
 100:J P[11:DROP] 100% CNT75 TB R[19]sec,CALL PARTDROP ACC100 BREAK    ;
 101:  DO[6:PART DROP COMPLETE]=PULSE,1.5sec ;
 102:  PAYLOAD[1] ;
 103:  CALL CHK_DROP    ;
 104:   ;
 105:J P[12:DROP DEPART] 100% CNT100 ACC100    ;
 106:   ;
 107:J P[13:DROP CLEAR] 100% CNT100 ACC100 DB    0.0mm,DO[7:PRESS STAMPING START]=PULSE,0.5sec    ;
 108:  !GOTO PICK POUNCE ;
 109:J P[2:PICK POUNCE] 100% CNT100 ACC100 BREAK    ;
 110:  IF DI[29:CYCLE STOP]=ON,JMP LBL[90] ;
 111:  JMP LBL[10] ;
 112:   ;
 113:  LBL[90:END OF CYCLE] ;
 114:  TIMER[1]=STOP ;
 115:  R[4:TOTAL CYCLE TIME]=TIMER[1]    ;
 116:  MONITOR END MON_PICK ;
 117:J P[1:MIDDLE] 50% CNT100    ;
 118:  MOVE TO HOME    ;
 119:   ;
 120:  LBL[100:END OF PROGRAM] ;
/POS
P[1:"MIDDLE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2174.621  mm,	Y =     -.011  mm,	Z =  -606.471  mm,
	W =   180.000 deg,	P =     -.000 deg,	R =  -180.000 deg,
	E1=   107.700 deg
};
P[2:"PICK POUNCE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2683.001  mm,	Y =  1049.448  mm,	Z =  -992.337  mm,
	W =  -179.861 deg,	P =      .006 deg,	R =   112.244 deg,
	E1=   175.098 deg
};
P[3:"PICK APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2669.402  mm,	Y =  3148.973  mm,	Z = -1158.097  mm,
	W =  -179.861 deg,	P =      .007 deg,	R =    89.607 deg,
	E1=   193.010 deg
};
P[4:"PICK"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2669.402  mm,	Y =  3148.973  mm,	Z = -1229.618  mm,
	W =  -179.861 deg,	P =      .007 deg,	R =    89.607 deg,
	E1=   193.010 deg
};
P[5:"PICK DEPART"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2669.402  mm,	Y =  3148.973  mm,	Z = -1163.537  mm,
	W =  -179.861 deg,	P =      .007 deg,	R =    89.607 deg,
	E1=   193.010 deg
};
P[6:"PICK SNEAK"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2683.002  mm,	Y =  1757.288  mm,	Z = -1163.537  mm,
	W =  -179.861 deg,	P =      .006 deg,	R =   112.244 deg,
	E1=   175.098 deg
};
P[7:"PICK CLEAR"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2683.002  mm,	Y =  1049.448  mm,	Z = -1163.537  mm,
	W =  -179.861 deg,	P =      .006 deg,	R =   112.244 deg,
	E1=   175.098 deg
};
P[8:"DROP POUNCE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2182.066  mm,	Y =     3.829  mm,	Z =  -783.568  mm,
	W =   179.921 deg,	P =     2.244 deg,	R =  -174.410 deg,
	E1=   106.407 deg
};
P[9:"DROP SNEAK"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2391.994  mm,	Y = -1557.458  mm,	Z =  -838.287  mm,
	W =  -179.920 deg,	P =     -.113 deg,	R =  -141.504 deg,
	E1=    70.279 deg
};
P[10:"DROP APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2711.444  mm,	Y = -3157.456  mm,	Z =  -952.526  mm,
	W =  -179.920 deg,	P =     -.113 deg,	R =   -87.620 deg,
	E1=    15.842 deg
};
P[11:"DROP"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2711.445  mm,	Y = -3157.456  mm,	Z = -1097.487  mm,
	W =  -179.920 deg,	P =     -.113 deg,	R =   -87.620 deg,
	E1=    15.842 deg
};
P[12:"DROP DEPART"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2711.445  mm,	Y = -3157.456  mm,	Z =  -948.046  mm,
	W =  -179.920 deg,	P =     -.113 deg,	R =   -87.620 deg,
	E1=    15.842 deg
};
P[13:"DROP CLEAR"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 1',
	X =  2419.596  mm,	Y =  -971.140  mm,	Z =  -838.287  mm,
	W =  -179.920 deg,	P =     -.113 deg,	R =  -141.504 deg,
	E1=    70.279 deg
};
/END
